package com.shuqing.download.mapper.full;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author wangshuqing
 * @date 2023/2/26 18:00
 */
@Mapper
public interface FullQueryResultMapper{

    /**
    * 所有
    * @date 2023/2/26 20:24
    * @author wangshuqing
    * @param sqlStr
     *@return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    * */
    @Select("${sqlStr}")
    List<Map<String,Object>> queryAnything(@Param(value = "sqlStr")String sqlStr);

    /**
    * 分页形式
    * @date 2023/2/26 20:39
    * @author wangshuqing
    * @param sqlStr
    * @param currIndex
    * @param pageSize
     *@return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    * */
    @Select("${sqlStr} limit ${currIndex},${pageSize}")
    List<Map<String,Object>> queryAnythingByPage(@Param(value = "sqlStr")String sqlStr,
                                                 @Param(value = "currIndex")Integer currIndex,
                                                 @Param(value = "pageSize")Integer pageSize);
}
